package view;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import java.awt.Point;
import java.util.HashMap;

public class ScreenLayout implements LayoutManager
{ HashMap<Component ,Point> layoutPoints = new HashMap<Component ,Point>();
public void addLayoutComponent(String arg0, Component arg1) 
{ }

public void layoutContainer(Container parent) 
{ int compCount = parent.getComponentCount();
  if(compCount == 0){ return; }
  for(int i = 0; i < compCount;i++)
  { Point loc = layoutPoints.get(parent.getComponent(i));
    if(loc != null)
    { parent.getComponent(i).setLocation(loc); }
  }
}

public Dimension minimumLayoutSize(Container arg0) 
{ return new Dimension(1024,640); }

public Dimension preferredLayoutSize(Container arg0) 
{ return new Dimension(1024,640); }

public void removeLayoutComponent(Component arg0) 
{ }

public void setLayoutPoint(Component component, Point point)
{ layoutPoints.put(component, point); }

}
